package com.andkrup.comm {
	import flash.events.IEventDispatcher;	
	import flash.events.Event;
	import flash.events.HTTPStatusEvent;
	import flash.events.SecurityErrorEvent;
	import flash.events.IOErrorEvent;
	import flash.events.ProgressEvent;
	
	/**
	 * @author Andkrup
	 */
	public function unsubscribeLoadListener(loader:IEventDispatcher, listener:ILoadListener):void{
		loader.removeEventListener(Event.COMPLETE, listener.onLoadComplete);
		loader.removeEventListener(Event.OPEN, listener.onLoadOpen);
		loader.removeEventListener(Event.INIT, listener.onLoadInit);
		loader.removeEventListener(ProgressEvent.PROGRESS, listener.onLoadProgress);
		loader.removeEventListener(IOErrorEvent.IO_ERROR, listener.onLoadIOError);
		loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, listener.onLoadSecurityError);
		loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, listener.onLoadHttpStatus);
	}
}
